package com.itheima.staticVariable;

public class TestDemo1 {
    // static 修饰变量为静态变量
    public static void main(String[] args) {
        Student.name = "袁华"; // 静态变量

        Student s1 = new Student();
        System.out.println(s1.name); // 袁华
        s1.age = 18;

        Student s2 = new Student();
        s2.name = "马冬梅";
        s2.age = 33;

        System.out.println(s1.name); // 马冬梅
        System.out.println(s2.name); // 马冬梅

        System.out.println(s1.age); // 18
        System.out.println(s2.age); // 33
    }
}
